import { SYSTEM } from '../api'
import { METHOD, request } from '@/utils/request'

/* 参数相关 */
// 新增
export async function addMenu(params) {
    return request(`${SYSTEM}/menu/save`, METHOD.POST, params)
}

// 删除
export async function delMenu(params) {
    return request(`${SYSTEM}/menu/del`, METHOD.POST, params)
}

// 修改
export async function updateMenu(params) {
    return request(`${SYSTEM}/menu/update`, METHOD.POST, params)
}

// 查询
export async function getMenuTree() {
    return request(`${SYSTEM}/menu/manage`, METHOD.POST, {})
}

export default {
    addMenu,
    delMenu,
    updateMenu,
    getMenuTree
}